//
//  MainApi.h
//  LuxuryGoods
//
//  Created by 刘星辰 on 2018/5/19.
//  Copyright © 2018年 Future. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef void (^ResultBlock)(NSDictionary *responseObject, NSError *error);

#define AddUserToken(dict) [[MainApi sharedInstance]addUserToken:dict]

#define HttpRequest [MainApi sharedInstance]

@interface MainApi : NSObject

+ (MainApi *)sharedInstance;

/**
 *  发送post请求
 *
 *  @param path  请求的网址字符串
 *  @param params 请求的参数
 *  @param resultBlock    请求成功的回调
 */

- (void)getPath:(NSString *)path params:(NSDictionary *)params resultBlock:(ResultBlock)resultBlock;

/**
 *  发送post请求
 *
 *  @param path  请求的网址字符串
 *  @param params 请求的参数
 *  @param resultBlock    请求成功的回调
 */

- (void)postPath:(NSString *)path params:(NSDictionary *)params resultBlock:(ResultBlock)resultBlock;


- (NSDictionary *)addUserToken:(NSDictionary *)params;
- (void)sendPostUploadFilePath:(NSString *)path params:(NSDictionary *)params fileDic:(NSDictionary *)fileDic resultBlock:(ResultBlock)resultBlock;
- (void)sendPostMutiUploadFilePath:(NSString *)path params:(NSDictionary *)params fileDic:(NSDictionary *)fileDic resultBlock:(ResultBlock)resultBlock;
@end
